using System.Collections.Generic;
using System.Threading.Tasks;
using JGSY.CMS.LowCode.Platform.Application.DTOs;

namespace JGSY.CMS.LowCode.Platform.Application.Interfaces
{
    /// <summary>
    /// 权限管理应用服务接口。
    /// 提供权限的增删改查等权限管理相关业务功能接口定义。
    /// </summary>
    public interface IPermissionAppService
    {
        /// <summary>
        /// 获取所有权限
        /// </summary>
        /// <returns>权限列表</returns>
        Task<IEnumerable<PermissionDto>> GetAllAsync();
        
        /// <summary>
        /// 根据ID获取权限
        /// </summary>
        /// <param name="id">权限标识符</param>
        /// <returns>权限信息</returns>
        Task<PermissionDto?> GetByIdAsync(long id);
        
        /// <summary>
        /// 添加新权限
        /// </summary>
        /// <param name="dto">权限数据传输对象</param>
        /// <returns>添加任务</returns>
        Task AddAsync(PermissionDto dto);
        
        /// <summary>
        /// 更新权限信息
        /// </summary>
        /// <param name="id">权限标识符</param>
        /// <param name="dto">权限数据传输对象</param>
        /// <returns>更新任务</returns>
        Task UpdateAsync(long id, PermissionDto dto);
        
        /// <summary>
        /// 删除权限
        /// </summary>
        /// <param name="id">权限标识符</param>
        /// <returns>删除任务</returns>
        Task DeleteAsync(long id);
    }
}
